<?php

namespace app\index\validate\trade;

use ShidianUtil\Thinkphp\Validate\BaseValidate;

/**
 * Class TradeInfo
 * @package app\index\validate\trade
 * @link https://www.kancloud.cn/manual/thinkphp6_0/1037623
 * @see \app\index\controller\trade\TradeInfo
 */
class TradeInfo extends BaseValidate
{

    /**
     * 定义验证规则
     * 格式：'字段名' =>  ['规则1','规则2'...]
     *
     * @var array
     */
    protected $rule = [
        'id'	=> 'isId',
		'payMethod'	=> 'scalar|max:16',
		'payMethodScene'	=> 'scalar|max:16',
		'orderNo'	=> 'scalar|max:64',
		'tradeNid'	=> 'scalar|max:64',
		'describe'	=> 'scalar|max:255',
		'tradeType'	=> 'scalar|max:32',
		'tradeTypeClass'	=> 'scalar|max:255',
		'questionId'	=> 'integer|max:11',
		'consultingId'	=> 'integer|max:11',
		'serverId'	=> 'integer|max:11',
		'serverSkuId'	=> 'integer|max:11',
		'redPacketId'	=> 'integer|max:11',
		'rewardId'	=> 'integer|max:11',
		'lawCaseId'	=> 'integer|egt:0|max:11',
		'lawsuitId'	=> 'integer|egt:0|max:11',
		'landingId'	=> 'integer|egt:0|max:11',
		'landingType'	=> 'scalar|max:16',
		'recharge_balance'	=> 'numeric|egt:0',
		'cashTransferId'	=> 'integer|max:11',
		'num'	=> 'integer|egt:0|max:11',
		'attach'	=> 'scalar',
		'startTime'	=> 'likeId',
		'endTime'	=> 'likeId',
		'payStatus'	=> 'scalar|max:16',
		'payTime'	=> 'likeId',
		'payExpTime'	=> 'likeId',
		'memberId'	=> 'integer|max:11',
		'totalMoney'	=> 'numeric|egt:0',
		'payMoney'	=> 'numeric|egt:0',
		'refundStatus'	=> 'scalar|max:16',
		'refundRequestTime'	=> 'likeId',
		'refundReason'	=> 'scalar|max:255',
		'refundCheckStatus'	=> 'scalar|max:16',
		'refundCheckUserId'	=> 'integer|egt:0|max:10',
		'refundNo'	=> 'scalar|max:64',
		'refundNid'	=> 'scalar|max:64',
		'refundTime'	=> 'likeId',
		'refundResult'	=> 'scalar|max:16',
		'settleStatus'	=> 'scalar|max:16',
		'settleTime'	=> 'likeId',
		'lawyerMoney'	=> 'numeric|egt:0',
		'settleConsultingId'	=> 'integer|egt:0|max:11',
		'settleLawyerId'	=> 'integer|egt:0|max:11',
		'settleLawyerMoney'	=> 'numeric|egt:0',
		'settleInviterId'	=> 'integer|egt:0|max:11',
		'settleInviterMoney'	=> 'numeric|egt:0',
		'settleLawCaseMemberId'	=> 'integer|egt:0|max:11',
		'settleLawCaseMoney'	=> 'numeric|egt:0',
		'isComment'	=> 'integer|max:1',
		'commentLevel'	=> 'integer|max:11',
		'comment'	=> 'scalar|max:255',
		'updated'	=> 'integer|max:11',
		'created'	=> 'integer|max:11',
        'page'      => 'integer|egt:0|max:11',
        'page_size' => 'integer|egt:0|max:11',
    ];

    protected $field = [
        'id'	=> 'id',
		'payMethod'	=> 'payMethod',
		'payMethodScene'	=> 'payMethodScene',
		'orderNo'	=> 'orderNo',
		'tradeNid'	=> 'tradeNid',
		'describe'	=> 'describe',
		'tradeType'	=> 'tradeType',
		'tradeTypeClass'	=> 'tradeTypeClass',
		'questionId'	=> 'questionId',
		'consultingId'	=> 'consultingId',
		'serverId'	=> 'serverId',
		'serverSkuId'	=> 'serverSkuId',
		'redPacketId'	=> 'redPacketId',
		'rewardId'	=> 'rewardId',
		'lawCaseId'	=> 'lawCaseId',
		'lawsuitId'	=> 'lawsuitId',
		'landingId'	=> 'landingId',
		'landingType'	=> 'landingType',
		'recharge_balance'	=> 'recharge_balance',
		'cashTransferId'	=> 'cashTransferId',
		'num'	=> 'num',
		'attach'	=> 'attach',
		'startTime'	=> 'startTime',
		'endTime'	=> 'endTime',
		'payStatus'	=> 'payStatus',
		'payTime'	=> 'payTime',
		'payExpTime'	=> 'payExpTime',
		'memberId'	=> 'memberId',
		'totalMoney'	=> 'totalMoney',
		'payMoney'	=> 'payMoney',
		'refundStatus'	=> 'refundStatus',
		'refundRequestTime'	=> 'refundRequestTime',
		'refundReason'	=> 'refundReason',
		'refundCheckStatus'	=> 'refundCheckStatus',
		'refundCheckUserId'	=> 'refundCheckUserId',
		'refundNo'	=> 'refundNo',
		'refundNid'	=> 'refundNid',
		'refundTime'	=> 'refundTime',
		'refundResult'	=> 'refundResult',
		'settleStatus'	=> 'settleStatus',
		'settleTime'	=> 'settleTime',
		'lawyerMoney'	=> 'lawyerMoney',
		'settleConsultingId'	=> 'settleConsultingId',
		'settleLawyerId'	=> 'settleLawyerId',
		'settleLawyerMoney'	=> 'settleLawyerMoney',
		'settleInviterId'	=> 'settleInviterId',
		'settleInviterMoney'	=> 'settleInviterMoney',
		'settleLawCaseMemberId'	=> 'settleLawCaseMemberId',
		'settleLawCaseMoney'	=> 'settleLawCaseMoney',
		'isComment'	=> 'isComment',
		'commentLevel'	=> 'commentLevel',
		'comment'	=> 'comment',
		'updated'	=> 'updated',
		'created'	=> 'created',
        'page'      => '分页页数',
        'page_size' => '分页大小',
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名' =>  '错误信息'
     *
     * @var array
     */
    protected $message = [
        'id.require'	=> '缺少:attribute',
		'id.isId'	=> '请设置正确的:attribute',
		'payMethod.require'	=> '请输入:attribute',
		'payMethod.scalar' => ':attribute应该是字符串',
		'payMethod.max'	=> ':attribute长度不能超过:rule位',
		'payMethodScene.require'	=> '请输入:attribute',
		'payMethodScene.scalar' => ':attribute应该是字符串',
		'payMethodScene.max'	=> ':attribute长度不能超过:rule位',
		'orderNo.require'	=> '请输入:attribute',
		'orderNo.scalar' => ':attribute应该是字符串',
		'orderNo.max'	=> ':attribute长度不能超过:rule位',
		'tradeNid.require'	=> '请输入:attribute',
		'tradeNid.scalar' => ':attribute应该是字符串',
		'tradeNid.max'	=> ':attribute长度不能超过:rule位',
		'describe.require'	=> '请输入:attribute',
		'describe.scalar' => ':attribute应该是字符串',
		'describe.max'	=> ':attribute长度不能超过:rule位',
		'tradeType.require'	=> '请输入:attribute',
		'tradeType.scalar' => ':attribute应该是字符串',
		'tradeType.max'	=> ':attribute长度不能超过:rule位',
		'tradeTypeClass.require'	=> '请输入:attribute',
		'tradeTypeClass.scalar' => ':attribute应该是字符串',
		'tradeTypeClass.max'	=> ':attribute长度不能超过:rule位',
		'questionId.require'	=> '请输入:attribute',
		'questionId.integer' => ':attribute应该是整数',
		'questionId.max'	=> ':attribute长度不能超过:rule位',
		'consultingId.require'	=> '请输入:attribute',
		'consultingId.integer' => ':attribute应该是整数',
		'consultingId.max'	=> ':attribute长度不能超过:rule位',
		'serverId.require'	=> '请输入:attribute',
		'serverId.integer' => ':attribute应该是整数',
		'serverId.max'	=> ':attribute长度不能超过:rule位',
		'serverSkuId.require'	=> '请输入:attribute',
		'serverSkuId.integer' => ':attribute应该是整数',
		'serverSkuId.max'	=> ':attribute长度不能超过:rule位',
		'redPacketId.require'	=> '请输入:attribute',
		'redPacketId.integer' => ':attribute应该是整数',
		'redPacketId.max'	=> ':attribute长度不能超过:rule位',
		'rewardId.require'	=> '请输入:attribute',
		'rewardId.integer' => ':attribute应该是整数',
		'rewardId.max'	=> ':attribute长度不能超过:rule位',
		'lawCaseId.require'	=> '请输入:attribute',
		'lawCaseId.integer' => ':attribute应该是整数',
		'lawCaseId.egt'	=> ':attribute应该大于等于:rule',
		'lawCaseId.max'	=> ':attribute长度不能超过:rule位',
		'lawsuitId.require'	=> '请输入:attribute',
		'lawsuitId.integer' => ':attribute应该是整数',
		'lawsuitId.egt'	=> ':attribute应该大于等于:rule',
		'lawsuitId.max'	=> ':attribute长度不能超过:rule位',
		'landingId.require'	=> '请输入:attribute',
		'landingId.integer' => ':attribute应该是整数',
		'landingId.egt'	=> ':attribute应该大于等于:rule',
		'landingId.max'	=> ':attribute长度不能超过:rule位',
		'landingType.require'	=> '请输入:attribute',
		'landingType.scalar' => ':attribute应该是字符串',
		'landingType.max'	=> ':attribute长度不能超过:rule位',
		'recharge_balance.require'	=> '请输入:attribute',
		'recharge_balance.numeric' => ':attribute应该是数字',
		'recharge_balance.egt'	=> ':attribute应该大于等于:rule',
		'cashTransferId.require'	=> '请输入:attribute',
		'cashTransferId.integer' => ':attribute应该是整数',
		'cashTransferId.max'	=> ':attribute长度不能超过:rule位',
		'num.require'	=> '请输入:attribute',
		'num.integer' => ':attribute应该是整数',
		'num.egt'	=> ':attribute应该大于等于:rule',
		'num.max'	=> ':attribute长度不能超过:rule位',
		'attach.require'	=> '请输入:attribute',
		'attach.scalar' => ':attribute应该是字符串',
		'startTime.require'	=> '请选择:attribute',
		'startTime.isId'	=> '请选择正确的:attribute',
		'endTime.require'	=> '请选择:attribute',
		'endTime.isId'	=> '请选择正确的:attribute',
		'payStatus.require'	=> '请输入:attribute',
		'payStatus.scalar' => ':attribute应该是字符串',
		'payStatus.max'	=> ':attribute长度不能超过:rule位',
		'payTime.require'	=> '请选择:attribute',
		'payTime.isId'	=> '请选择正确的:attribute',
		'payExpTime.require'	=> '请选择:attribute',
		'payExpTime.isId'	=> '请选择正确的:attribute',
		'memberId.require'	=> '请输入:attribute',
		'memberId.integer' => ':attribute应该是整数',
		'memberId.max'	=> ':attribute长度不能超过:rule位',
		'totalMoney.require'	=> '请输入:attribute',
		'totalMoney.numeric' => ':attribute应该是数字',
		'totalMoney.egt'	=> ':attribute应该大于等于:rule',
		'payMoney.require'	=> '请输入:attribute',
		'payMoney.numeric' => ':attribute应该是数字',
		'payMoney.egt'	=> ':attribute应该大于等于:rule',
		'refundStatus.require'	=> '请输入:attribute',
		'refundStatus.scalar' => ':attribute应该是字符串',
		'refundStatus.max'	=> ':attribute长度不能超过:rule位',
		'refundRequestTime.require'	=> '请选择:attribute',
		'refundRequestTime.isId'	=> '请选择正确的:attribute',
		'refundReason.require'	=> '请输入:attribute',
		'refundReason.scalar' => ':attribute应该是字符串',
		'refundReason.max'	=> ':attribute长度不能超过:rule位',
		'refundCheckStatus.require'	=> '请输入:attribute',
		'refundCheckStatus.scalar' => ':attribute应该是字符串',
		'refundCheckStatus.max'	=> ':attribute长度不能超过:rule位',
		'refundCheckUserId.require'	=> '请输入:attribute',
		'refundCheckUserId.integer' => ':attribute应该是整数',
		'refundCheckUserId.egt'	=> ':attribute应该大于等于:rule',
		'refundCheckUserId.max'	=> ':attribute长度不能超过:rule位',
		'refundNo.require'	=> '请输入:attribute',
		'refundNo.scalar' => ':attribute应该是字符串',
		'refundNo.max'	=> ':attribute长度不能超过:rule位',
		'refundNid.require'	=> '请输入:attribute',
		'refundNid.scalar' => ':attribute应该是字符串',
		'refundNid.max'	=> ':attribute长度不能超过:rule位',
		'refundTime.require'	=> '请选择:attribute',
		'refundTime.isId'	=> '请选择正确的:attribute',
		'refundResult.require'	=> '请输入:attribute',
		'refundResult.scalar' => ':attribute应该是字符串',
		'refundResult.max'	=> ':attribute长度不能超过:rule位',
		'settleStatus.require'	=> '请输入:attribute',
		'settleStatus.scalar' => ':attribute应该是字符串',
		'settleStatus.max'	=> ':attribute长度不能超过:rule位',
		'settleTime.require'	=> '请选择:attribute',
		'settleTime.isId'	=> '请选择正确的:attribute',
		'lawyerMoney.require'	=> '请输入:attribute',
		'lawyerMoney.numeric' => ':attribute应该是数字',
		'lawyerMoney.egt'	=> ':attribute应该大于等于:rule',
		'settleConsultingId.require'	=> '请输入:attribute',
		'settleConsultingId.integer' => ':attribute应该是整数',
		'settleConsultingId.egt'	=> ':attribute应该大于等于:rule',
		'settleConsultingId.max'	=> ':attribute长度不能超过:rule位',
		'settleLawyerId.require'	=> '请输入:attribute',
		'settleLawyerId.integer' => ':attribute应该是整数',
		'settleLawyerId.egt'	=> ':attribute应该大于等于:rule',
		'settleLawyerId.max'	=> ':attribute长度不能超过:rule位',
		'settleLawyerMoney.require'	=> '请输入:attribute',
		'settleLawyerMoney.numeric' => ':attribute应该是数字',
		'settleLawyerMoney.egt'	=> ':attribute应该大于等于:rule',
		'settleInviterId.require'	=> '请输入:attribute',
		'settleInviterId.integer' => ':attribute应该是整数',
		'settleInviterId.egt'	=> ':attribute应该大于等于:rule',
		'settleInviterId.max'	=> ':attribute长度不能超过:rule位',
		'settleInviterMoney.require'	=> '请输入:attribute',
		'settleInviterMoney.numeric' => ':attribute应该是数字',
		'settleInviterMoney.egt'	=> ':attribute应该大于等于:rule',
		'settleLawCaseMemberId.require'	=> '请输入:attribute',
		'settleLawCaseMemberId.integer' => ':attribute应该是整数',
		'settleLawCaseMemberId.egt'	=> ':attribute应该大于等于:rule',
		'settleLawCaseMemberId.max'	=> ':attribute长度不能超过:rule位',
		'settleLawCaseMoney.require'	=> '请输入:attribute',
		'settleLawCaseMoney.numeric' => ':attribute应该是数字',
		'settleLawCaseMoney.egt'	=> ':attribute应该大于等于:rule',
		'isComment.require'	=> '请输入:attribute',
		'isComment.integer' => ':attribute应该是整数',
		'isComment.max'	=> ':attribute长度不能超过:rule位',
		'commentLevel.require'	=> '请输入:attribute',
		'commentLevel.integer' => ':attribute应该是整数',
		'commentLevel.max'	=> ':attribute长度不能超过:rule位',
		'comment.require'	=> '请输入:attribute',
		'comment.scalar' => ':attribute应该是字符串',
		'comment.max'	=> ':attribute长度不能超过:rule位',
		'updated.require'	=> '请输入:attribute',
		'updated.integer' => ':attribute应该是整数',
		'updated.max'	=> ':attribute长度不能超过:rule位',
		'created.require'	=> '请输入:attribute',
		'created.integer' => ':attribute应该是整数',
		'created.max'	=> ':attribute长度不能超过:rule位',
        'page.require'      => '请输入:attribute',
        'page.integer'      => ':attribute应该是整数',
        'page.egt'          => ':attribute应该大于等于:rule',
        'page.max'          => ':attribute长度不能超过:rule位',
        'page_size.require' => '请输入:attribute',
        'page_size.integer' => ':attribute应该是整数',
        'page_size.egt'     => ':attribute应该大于等于:rule',
        'page_size.max'     => ':attribute长度不能超过:rule位',
    ];

    protected $scene = [
        'delete' => ['id' => 'require'],
        'index'  => ['page', 'page_size'],
        'read'   => ['id' => 'require'],
        'save'   => ['payMethod', 'payMethodScene', 'orderNo', 'tradeNid', 'describe', 'tradeType', 'tradeTypeClass', 'questionId', 'consultingId', 'serverId', 'serverSkuId', 'redPacketId', 'rewardId', 'lawCaseId', 'lawsuitId', 'landingId', 'landingType', 'recharge_balance', 'cashTransferId', 'num', 'attach', 'startTime', 'endTime', 'payStatus', 'payTime', 'payExpTime', 'memberId', 'totalMoney', 'payMoney', 'refundStatus', 'refundRequestTime', 'refundReason', 'refundCheckStatus', 'refundCheckUserId', 'refundNo', 'refundNid', 'refundTime', 'refundResult', 'settleStatus', 'settleTime', 'lawyerMoney', 'settleConsultingId', 'settleLawyerId', 'settleLawyerMoney', 'settleInviterId', 'settleInviterMoney', 'settleLawCaseMemberId', 'settleLawCaseMoney', 'isComment', 'commentLevel', 'comment', 'updated', 'created'],
    ];

}
